<%--
  Created by IntelliJ IDEA.
  User: konley
  Date: 2020/6/9
  Time: 11:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录 | 校园一卡通</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/css.css"/>
    <script src="${pageContext.request.contextPath }/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
    <script src="${pageContext.request.contextPath }/js/jquery-3.4.1.js" type="text/javascript"
            charset="utf-8"></script>
    <style type="text/css">
        body{
            background-image: url("photo/bg.jpg");
        }
        .panel{
            opacity:0.9;
        }
    </style>
</head>
<body>

<div class="container">
    <div class="row">
        <br><br><br>
        <div class="col-sm-4 col-sm-offset-4">
            <div class="panel panel-primary" style="margin-top: 100px;">
                <div class="panel-body">
                    <form name="reg" action="LoginServlet" method="post" class="form-horizontal" role="form">
                        <h2 class="text-center" style="font-weight:bold;">
                            L O G<span style="color: #c9302c"> I N</span>
                        </h2>
                        <hr>
                        <br>
                        <div class="form-group ">
                            <label class="col-sm-3 control-label">账号</label>
                            <div class="col-sm-8">
                                <input name="id" type="text" class="form-control"  placeholder="请输入工号或者学号"
                                       value="<%=request.getAttribute("inputId")==null?"":request.getAttribute("inputId")%>"/>
                            </div>
                        </div>
                        <div class="form-group ">
                            <label class="col-sm-3 control-label">密码</label>
                            <div class="col-sm-8">
                                <input name="password" type="password" class="form-control" placeholder="请输入密码"
                                       value="<%=request.getAttribute("inputPsw")==null?"":request.getAttribute("inputPsw")%>"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">验证码</label>
                            <div class="col-sm-4">
                                <input name="checkcode" type="text" class="form-control" placeholder="验证码" />
                            </div>
                            <div class="col-sm-4">
                                <input type="image" name="img-code" id="img-code"
                                       alt="看不清，点击换图" src="CheckCode"
                                       onclick="javascript:this.src='CheckCode?'+new Date().getTime();return false;">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">身份</label>
                            <div class="col-sm-4">
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="m" id="optionsRadios1" value="manager" checked>管理员
                                    </label>
                                </div>
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="m" id="optionsRadios2" value="student" checked>学生
                                    </label>
                                </div>
                            </div>
                        </div>
                        <%
                            if (request.getAttribute("msg") != null) {
                        %>
                        <div class="alert alert-danger" style="text-align: center">提示：<%=request.getAttribute("msg")%></div>
                        <% } %>
                        <hr>
                        <div class="form-group" style="text-align: center">
                            <div class="col-sm-12">
                                <button type="submit" class="btn btn-success" style="width: 80%;background-color:mediumseagreen">登 录</button>
                            </div>
                        </div>

                    </form>
                </div>
            </div>

        </div>
    </div>
</div>
</body>
</html>
